import time
import string
import random


def current_timestamp():
    return int(round(time.time() * 1000))


def current_plus_timestamp(plus_time):
    return int(round(time.time() * 1000)) + plus_time


def current_date_str():
    return time.strftime('%Y%m%d')


def current_date_time_str():
    """
    获取年月日时分秒字符串
    """
    return time.strftime('%Y%m%d%H%M%S')


def current_date_time_string():
    """
    获取年月日时分秒字符串, 格式yyyy-MM-dd HH:mm:ss
    """
    return time.strftime('%Y-%m-%d %H:%M:%S')


def current_date_time_with_random():
    date_time_str = current_date_time_str()
    suffix = ''
    for i in range(3):
        suffix += random.choice(string.ascii_letters)

    return date_time_str + suffix
